<cfcomponent output="false">
	<cffunction name="init" access="public" output="false" returntype="LoadColdspring">
		<cfset variables["properties"] = arguments />
		<cfreturn this />
	</cffunction>
	
	<cffunction name="loadServiceFactory" access="public" output="false" returntype="coldspring.beans.AbstractBeanFactory">
		<cfset var serviceFactory = "" />
		<cfif NOT StructKeyExists(variables["properties"],"configPath")>
			<cfthrow message="You must define a configPath in order to load ColdSpring" />
		</cfif>
		<cfset serviceFactory = CreateObject("component","coldspring.beans.DefaultXmlBeanFactory").init(StructNew(),variables["properties"]) />
		<cfset serviceFactory.loadBeansFromXmlFile(ExpandPath(variables["properties"]["configPath"]),true)>
		<cfreturn serviceFactory />
	</cffunction>
</cfcomponent>

